package com.android.thought.badboys.Info;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Comparator;

public class PhoneInfo implements Comparator<PhoneInfo>, Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -1930675314912179822L;
	int mId;
	String mName;

	String mPhoneNumber;

	ArrayList<String> mSubNumber = null;
	int mContact_Id;

	public PhoneInfo() {
	}

	public PhoneInfo(int id, String name, String number, int contact_id) {
		this.mId = id;
		this.mName = name;
		this.mPhoneNumber = number;
		this.mContact_Id = contact_id;
	}

	public void addSubNumber(String number) {
		if (mSubNumber == null)
			mSubNumber = new ArrayList<String>();

		mSubNumber.add(number);
	}

	public int getContact_id() {
		return this.mContact_Id;
	}

	public void setContact_id(int id) {
		this.mContact_Id = id;
	}

	public int getId() {
		return mId;
	}

	public void setId(int id) {
		mId = id;
	}

	public String getName() {
		return mName;
	}

	public void setName(String name) {
		mName = name;
	}

	public String getPhoneNumber() {
		return mPhoneNumber;
	}

	public void setPhoneNumber(String phone) {
		mPhoneNumber = phone;
	}

	@Override
	public int compare(PhoneInfo lhs, PhoneInfo rhs) {
		return lhs.getName().compareTo(rhs.getName());
	}

}
